package cn.wh.xwm.hibernate.dao;

/**
 * InventoryinfoId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class InventoryinfoId implements java.io.Serializable {

	// Fields

	private String customerId;
	private String productId;

	// Constructors

	/** default constructor */
	public InventoryinfoId() {
	}

	/** full constructor */
	public InventoryinfoId(String customerId, String productId) {
		this.customerId = customerId;
		this.productId = productId;
	}

	// Property accessors

	public String getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}

	public String getProductId() {
		return this.productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof InventoryinfoId))
			return false;
		InventoryinfoId castOther = (InventoryinfoId) other;

		return ((this.getCustomerId() == castOther.getCustomerId()) || (this
				.getCustomerId() != null
				&& castOther.getCustomerId() != null && this.getCustomerId()
				.equals(castOther.getCustomerId())))
				&& ((this.getProductId() == castOther.getProductId()) || (this
						.getProductId() != null
						&& castOther.getProductId() != null && this
						.getProductId().equals(castOther.getProductId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getCustomerId() == null ? 0 : this.getCustomerId()
						.hashCode());
		result = 37 * result
				+ (getProductId() == null ? 0 : this.getProductId().hashCode());
		return result;
	}

}